package dice.sinanya.tools.getinfo;

import java.util.Locale;

public class CheckSystem {
    public static SystemType checkSystem() {
        String systemInfo = System.getProperty("os.name").toLowerCase(Locale.US);
        if (systemInfo.contains("windows")) {
            return SystemType.WIN;
        } else if (systemInfo.contains("mac") && systemInfo.indexOf("os") > 0 && systemInfo.indexOf("x") > 0) {
            return SystemType.MAC;
        } else if (systemInfo.contains("linux")) {
            return SystemType.LINUX;
        }
        return SystemType.WIN;
    }
}
